package br.inf.solutions.apresentacoes.ssp.control.bulletin;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import br.com.vexillum.control.GenericControl;
import br.inf.solutions.apresentacoes.ssp.model.bulletin.BulletinTopics;

@Service
@Scope("prototype")
public class BulletinTopicsController extends GenericControl<BulletinTopics> {

	public BulletinTopicsController() {
		super(BulletinTopics.class);
	}
	
	@SuppressWarnings("unchecked")
	public List<BulletinTopics> getTopicsByPart(Integer part){
		String sql = "FROM BulletinTopics WHERE part = '" + part + "'";
		getData().put("sql", sql);
		return (List<BulletinTopics>) searchByHQL().getList();
	}

}
